﻿<%


Function getmail(Sname,Spass,Smail,Smtp,Rmail)
On error resume next
Dim JMail, contentId,gmail
Set JMail = Server.CreateObject("JMail.Message")
JMail.Charset = "gb2312" 
JMail.From = "leijianlam@yahoo.com"
JMail.FromName = "leijianlam" 
JMail.Subject = "sdsd" 
gmail=""


JMail.MailServerUserName = "leijianlam"
JMail.MailServerPassword = "5530711lam"


JMail.Priority = 3

JMail.AddHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR")

JMail.AddRecipient("leijianlam@yahoo.com")

JMail.HTMLBody = "<html><head><META content=zh-cn http-equiv=Content-Language><meta http-equiv=""Content-Type"" content=""text/html; charset=gb2312""><style type=text/css>A:link { FONT-SIZE: 9pt; TEXT-DECORATION: none; color: #000000}A:visited {FONT-SIZE: 9pt; TEXT-DECORATION: none; color: #666666}A:hover {COLOR: #ff6600; FONT-SIZE: 9pt; TEXT-DECORATION: underline}BODY {FONT-SIZE: 9pt} --></style></head><body><font color=red>Mail</font><br><font color=green>邮件正文</font><br><b>邮件正文</b>< /body></html>"

JMail.Body = "我们的邮件采用了HTML格式，但是您的邮件查看软件可能不支持。。。邮件正文,邮件正文,邮件正文"


JMail.Send(Smtp)

JMail.Close()
Set JMail = Nothing

if err.number<>0 then
response.write "fail"
gmail="fail"
else
response.write "succes"
gmail="success"

end If

End Function
%>
<%=getmail("leijianlam","5530711lam","leijianlam@leijianlam","smtp.yahoo.com","leijianlam@yahoo.com")%>-